package com.dhcc.bpm.modules.common.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.common.entity.Plupload;
import com.dhcc.bpm.modules.common.entity.Upload;
import com.dhcc.bpm.modules.common.vo.PluploadVO;
import org.springblade.core.mp.base.BaseService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @ClassName IPluploadService
 * @Description  公共模块表 服务类
 * @Author xiafayu
 * @Date 2020/2/21 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
public interface IPluploadService extends BaseService<Plupload> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param plupload
	 * @return
	 */
	IPage<PluploadVO> selectPluploadPage(IPage<PluploadVO> page, PluploadVO plupload);

	/**
	 * @author: ChenZe
	 * @date: 2019/11/27 15:00
	 * @description: 上传文件
	 * @param: []
	 * @return: boolean
	 */
	Long fileUpload(Plupload plupload,Upload upload, HttpServletRequest request);


   /**
    * @Author wangjinghan
    * @Description 文件上传到服务器
    * @date: 2020/8/7 9:34
    */
	Long fileUploadS(Plupload plupload,Upload upload );


   /**
    * @Author wangjinghan
    * @Description 文件从到服务器下载
    * @date: 2020/8/7 9:34
    */
   public HttpServletResponse fileDownloadServer(Long id, HttpServletResponse response);

	/**
	 * @author: lizeyu
	 * @date: 2019/11/27 15:00
	 * @description: 上传文件
	 * @param: []
	 * @return: boolean
	 */
	Long fileUpload(Plupload plupload,Upload upload, String opcSysId,String productNum,HttpServletRequest request);

	/**
	 * @author: lizeyu
	 * @date: 2019/11/27 15:00
	 * @description: 上传文件
	 * @param: []
	 * @return: boolean
	 */
	Long fileUpload(Plupload plupload,Upload upload, String opcSysId,String productNum,String apiNum,String apiVersion,HttpServletRequest request);
	/**
	 * @author: ChenZe
	 * @date: 2019/11/29 15:08
	 * @description: 下载文件
	 * @param: [plupload, request, response]
	 * @return: boolean
	 */
	HttpServletResponse fileDownload(Long id, HttpServletRequest request, HttpServletResponse response);

	/**
	* @author: 陈泽
	* @date: 2019/12/6 17:56
	* @description: 删除文件
	* @param: [plupload]
	* @return: boolean
	*/
	boolean fileDelete(Long id);

	/**
	 * 获取请求信息
	 * @param upload
	 * @return
	 */
	Upload getFile(Upload upload);

	/**
	 * 上传头像
	 * @param plupload
	 * @param upload
	 * @param request
	 * @return
	 */
    String photoUpload(Plupload plupload, Upload upload, HttpServletRequest request);

    /**
     * @Description 本地上传文件通用
     * @Author sjm
     * @Date 11:19 2020/3/7 0007
     * @param plupload
     * @param upload
     * @param request
     * @return java.lang.Long
     **/
	Long fileLocalUpload(Plupload plupload, Upload upload, HttpServletRequest request);

	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/4/29 16:47
	 * @param content
	 * @param docName
	 * @return java.lang.String
	 * @throws
	 **/
	String htmlToWord(String content, String docName);

	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/5/21 11:53
	 * @param id 
	 * @return com.dhcc.bpm.modules.common.entity.Plupload
	 * @throws 
	 **/
	Plupload selectById(Long id);
	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/5/21 11:53fileUploadS
	 * @param url
	 * @return com.dhcc.bpm.modules.common.entity.Plupload
	 * @throws
	 **/
	Plupload selectByUrl(String url);
}
